package com.shuqi.controller;

import android.content.Context;

import com.shuqi.interfaces.IEventListener;
import com.shuqi.model.AccountBindModel;

/**
 * 
 * @author yaozhen 绑定账号的controller，包含 手机号绑定，邮箱绑定
 */
public class AccountBindController extends ControllerBase {

    public static final int ACCOUNT_BIND = 100;

    private AccountBindModel mBindmodel; // 绑定账号的model

    public AccountBindController(Context context) {
        mBindmodel = new AccountBindModel(context);
    }

    @Override
    public void addEventListener(IEventListener listener) {
        mBindmodel.addEventListener(listener);
    }

    @Deprecated
    @Override
    public void handle(int eventType, Object... obj) {}

    public void bind(String account, String password, int type, String vcode, String weiboName) {
        mBindmodel.bind(account, password, type, vcode, weiboName);
    }

    @Override
    public void onDestroy() {
        if (mBindmodel != null) {
            mBindmodel.onDestroy();
        }
    }
}
